package com.zmc.product.infrastructure.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.math.BigDecimal;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

/**
 * 商品sku信息
 * 
 * @author zmc
 * @email 
 * @date 2024-10-14 18:43:35
 */
@Data
@TableName("commodity_goods_sku")
public class CommodityGoodsSkuEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 主键
	 */
	@TableId
	private Long id;
	/**
	 * 商品spuId
	 */
	private String spuId;
	/**
	 * sku编号
	 */
	private String skuId;
	/**
	 * 采购价格
	 */
	private BigDecimal purchasePrice;
	/**
	 * 销售价格
	 */
	private BigDecimal salePrice;
	/**
	 * 销售属性
	 */
	private String saleProperties;

	private String picture;

	@TableField(value = "create_time", fill = FieldFill.INSERT)
	private LocalDateTime createTime;

	@TableField(value = "create_by")
	private String createBy;

	@TableField(value = "update_time", fill = FieldFill.UPDATE)
	private LocalDateTime updateTime;

	@TableField(value = "update_by")
	private String updateBy;

	//商品名称
	@JsonInclude(JsonInclude.Include.NON_EMPTY)
	@TableField(exist = false)
	private String name;
}
